<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta name="author" content="WangHao">
	<script language="javascript" src="../script/common.js" type="text/javascript"></script>
	<script language="javascript" type="text/javascript">
		var qt = {};
		var qt1 = {};				//数据表格对象
		var qt2 = {};				//数据表格对象
		var qt3 = {};				//数据表格对象
		function load(){
			setPages(["listBorder1","listBorder2","listBorder3"])
		}
		function getBackValue(){
			var radio = Common.getRadioValue("radioButton");
			return radio;
		}
		function getBackValue1(){
			
		}			
		function onSave(){
			var checkbox = Common.getCheckBoxValue("checkboxs");
			if(!checkbox){
				showWarning("请选择");
				return;
			}
			DWR.call('pointActivityService.searchGoods',checkbox,function(t){
				var v1 = getBackValue();
				if(!v1){
					showWarning("请选择");
					return;
				}
				var v = {0:v1,1:t};
				
				dialogBackValue(v)
			});
		} 
		function allGoods(){
			switchPage("listBorder1");
			createTable1();
			qt1.showTable();
		}
		function oilGoods(){
			switchPage("listBorder2");
			createTable2();
			qt2.showTable();
		}
		function goods(){
			switchPage("listBorder3");
			createTable3();
			qt3.showTable();
		}
		//生成表格，创建QueryTable对象   
		function createTable1(){
			var columns = [];
			columns[0]={type:"checkbox"}
			columns[2]={title:"-",width:"25%"}
			columns[3]={title:"-",width:"25%"}
			qt1 = new QueryTable("sel_allgoods","pointRuleTemForm","datalist1",columns);
		}
		//生成表格，创建QueryTable对象   
		function createTable2(){
			var columns = [];
			columns[0]={type:"checkbox"}
			columns[2]={title:"-",width:"25%"}
			columns[3]={title:"-",width:"25%"}
			qt2 = new QueryTable("sel_oil","pointRuleTemForm","datalist2",columns);
		}
		
		//生成表格，创建QueryTable对象   
		function createTable3(){
			var columns = [];
			columns[0]={type:"checkbox"}
			columns[2]={title:"-",width:"25%"}
			columns[3]={title:"-",width:"25%"}
			qt3 = new QueryTable("sel_goods","pointRuleTemForm","datalist3",columns);
		}
	</script>
	</head>
<body class="body" onload="load()">
	<div id="listview">	
		<!--查询条件form-->
		<input type="hidden" name="shangpin" disabled onblur="checkV(this,'',true)">
		<div class=form>
		<form id="pointRuleTemForm" name="pointRuleTemForm">
			<div class="searchForm">
				<input type="radio" name="radiobutton" onclick="allGoods()" value="所有商品"><label>所有商品</label> <br>
				<input type="radio" name="radiobutton" onclick="oilGoods()" value="油品"><label>油品</label> <br>
				<input type="radio" name="radiobutton" onclick="goods()" value="非油品"><label>非油品</label>
			</div>
		</form>
		</div>
				<div class="listBorder1" id="listBorder1" style="display:none;">
					<div id=datalist1></div>
				</div>
		
				<div class="listBorder2" id="listBorder2" style="display:none;">
				<div id=datalist2></div>
				</div>
				
				<div class="listBorder3" id="listBorder3" style="display:none;">
				<div id=datalist3></div>
				</div>
				
		</div>
	</div>
</body>
</html>
